package oj_jisuanke;

import java.util.Scanner;

/**
 * Created by zhangyi on 2017/7/4.
 */
public class T325 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int curr;
        do {
            curr = scanner.nextInt();
            if (curr == 0){
                return;
            }
            int count = 1;
            while (curr > 3){
                curr = (int) Math.ceil(curr/3.0);
                count++;
            }
            System.out.println(count);
        } while (true);

    }

}
